<script>

function deleteABandPratica(data){
	$.SmartMessageBox({
		title : "<div class='row'><div class='col-md-2'><i class='fa '></i></div><div class='col-md-10'>Stai per eliminare un intervista dalla piattaforma!</div>",
		content : "<div class='col-md-2'></div><div class='col-md-10'> Sei sicuro di volerlo fare?<BR/><BR/></div></div>",
		buttons:"[Si],[No]",
		sound:false
	}, function(ButtonPressed, Value) {
		if (ButtonPressed === "No") {
			
		}
		if (ButtonPressed === "Si") {

			${remoteFunction(
					asynchronous: false,
					action:'deleteABandPratica',
					controller:'interview',
					params: '\'codPratica=\' + data',
					onSuccess: 'showCancelABResponse(data)'		
			)}
		}
	   });
}

function showCancelABResponse(data){
	$.smallBox({
		title : data.message,
		color : "#3F8DBF",
		sound:false,
		timeout: 3000
	});
	setTimeout(function(){ location.reload();}, 2000);	
}
</script>

			<g:if test="${abExist && abExist!=""}">
				<div class="row">
					<div class="col-lg-12">
						<h5>&nbsp;&nbsp;&nbsp;&nbsp;<b>Lista Rapporto Bancari</b></h5>	
					</div>
				</div>
				
				<g:if test="${abContoC && !abContoC.isEmpty()}">				
					<div class="row">
						<div class="col-lg-12 col-md-offset-1">
							<h6>Anomalie di Tipo Conto Corrente</br></br></h6>	
						</div>
					</div>
					<div class="row">
						<div class="col-lg-11 col-md-offset-1">
							<div class="jarviswidget jarviswidget-color-darken" id="wid-id-0" data-widget-editbutton="false">
								<div class="widget-body no-padding" style="min-height: 50px">
								<table id="dt_basic" class="table table-striped table-bordered table-hover" width="90%">
									<thead>			                
										<tr>
											<th >Descrizione</th>
											<th >Cod. Pratica</th>
											<th >Creato</th>
											<th></th>
										</tr>
									</thead>
									<tbody>									
										<g:each  in="${abContoC}" var="abc">							
											<tr>
												<td>${abc[1].toString()}</td>
												<td>${abc[0].toString()}</td>
												<td><g:formatDate format="dd-MM-yyyy" date="${abc[2]}"/></td>
												<td align="center">
													<span><a href="/Pratica/anomaliabancaria/${abc[0].toString()}" onclick="#"><i class="fa fa-lg fa-gavel"></i></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
													<span><a data-toggle="tooltip" title="Elimina Pratica" href="javascript:void(deleteABandPratica('${abc[0].toString()}'))" onclick="#">
														<i class="fa fa-lg fa-trash-o"></i></a> </span>
												</td>
											</tr>	
										</g:each>
									</tbody>
								</table>
								</div>
							</div>
						</div>
					</div>
				</g:if>								

				<g:if test="${abMutuo && !abMutuo.isEmpty()}">
					<div class="row">
						<div class="col-lg-12 col-md-offset-1">
							<h6>Anomalie di Tipo Mutuo</br></br></h6>	
						</div>
					</div>
					<div class="row">
						<div class="col-lg-11 col-md-offset-1">
							<div class="jarviswidget jarviswidget-color-darken" id="wid-id-0" data-widget-editbutton="false">
								<div class="widget-body no-padding" style="min-height: 50px">
								<table id="dt_basic" class="table table-striped table-bordered table-hover" width="90%">
									<thead>			                
										<tr>
											<th >Descrizione</th>
											<th >Cod. Pratica</th>
											<th >Creato</th>
											<th></th>
										</tr>
									</thead>
									<tbody>									
										<g:each  in="${abMutuo}" var="abm">							
											<tr>
												<td>${abm[1].toString()}</td>
												<td>${abm[0].toString()}</td>
												<td><g:formatDate format="dd-MM-yyyy" date="${abm[2]}"/></td>
												<td align="center">
													<span><a href="/Pratica/anomaliabancaria/${abm[0].toString()}" onclick="#"><i class="fa fa-lg fa-gavel"></i></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
													<span><a data-toggle="tooltip" title="Elimina Pratica" href="javascript:void(deleteABandPratica('${abm[0].toString()}'))" onclick="#">
														<i class="fa fa-lg fa-trash-o"></i></a> </span>
												</td>
											</tr>	
										</g:each>
									</tbody>
								</table>
								</div>
							</div>
						</div>
					</div>
				</g:if>	
				
				<g:if test="${abLeasing && !abLeasing.isEmpty()}">
					<div class="row">
						<div class="col-lg-12 col-md-offset-1">
							<h6>Anomalie di Tipo Leasing</br></br></h6>	
						</div>
					</div>
					<div class="row">
						<div class="col-lg-11 col-md-offset-1">
							<div class="jarviswidget jarviswidget-color-darken" id="wid-id-0" data-widget-editbutton="false">
								<div class="widget-body no-padding" style="min-height: 50px">
								<table id="dt_basic" class="table table-striped table-bordered table-hover" width="90%">
									<thead>			                
										<tr>
											<th >Descrizione</th>
											<th >Cod. Pratica</th>
											<th >Creato</th>
											<th></th>
										</tr>
									</thead>
									<tbody>									
										<g:each  in="${abLeasing}" var="abl">							
											<tr>
												<td>${abl[1].toString()}</td>
												<td>${abl[0].toString()}</td>
												<td><g:formatDate format="dd-MM-yyyy" date="${abl[2]}"/></td>
												<td align="center">
													<span><a href="/Pratica/anomaliabancaria/${abl[0].toString()}" onclick="#"><i class="fa fa-lg fa-gavel"></i></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
													<span><a data-toggle="tooltip" title="Elimina Pratica" href="javascript:void(deleteABandPratica('${abl[0].toString()}'))" onclick="#">
														<i class="fa fa-lg fa-trash-o"></i></a> </span>
												</td>
											</tr>	
										</g:each>
									</tbody>
								</table>
								</div>
							</div>
						</div>
					</div>
				</g:if>	
				
				<g:if test="${abDerivato && !abDerivato.isEmpty()}">
					<div class="row">
						<div class="col-lg-12 col-md-offset-1">
							<h6>Anomalie di Tipo Derivato</br></br></h6>	
						</div>
					</div>
					<div class="row">
						<div class="col-lg-11 col-md-offset-1">
							<div class="jarviswidget jarviswidget-color-darken" id="wid-id-0" data-widget-editbutton="false">
								<div class="widget-body no-padding" style="min-height: 50px">
								<table id="dt_basic" class="table table-striped table-bordered table-hover" width="90%">
									<thead>			                
										<tr>
											<th >Descrizione</th>
											<th >Cod. Pratica</th>
											<th >Creato</th>
											<th></th>
										</tr>
									</thead>
									<tbody>
										<g:each  in="${abDerivato}" var="abd">						
											<tr>
												<td>${abd[1].toString()}</td>
												<td>${abd[0].toString()}</td>
												<td><g:formatDate format="dd-MM-yyyy" date="${abd[2]}"/></td>
												<td align="center">
													<span><a href="/Pratica/anomaliabancaria/${abd[0].toString()}" onclick="#"><i class="fa fa-lg fa-gavel"></i></a> </span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
													<span><a data-toggle="tooltip" title="Elimina Pratica" href="javascript:void(deleteABandPratica('${abd[0].toString()}'))" onclick="#">
														<i class="fa fa-lg fa-trash-o"></i></a> </span></td>
											</tr>	
										</g:each>
									</tbody>
								</table>
								</div>
							</div>
						</div>
					</div>
				</g:if>									
			</g:if>

</br></br>


